package com.xqc.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xqc.mode.TLog;
import com.xqc.service.TLogService;

/**
* @author 作者 Gavin.Dai/SNSSZ00036
* @dateTime 创建时间：2020年8月18日 下午3:36:24
* @version V1.0.0
* 类说明
*/
@RestController
@RequestMapping("/log")
public class TLogController {

	@Autowired
	private TLogService tLogService;
	
	@GetMapping("/add")
	public String add(){
	boolean result = true;
	for (int i = 0; i < 5; i++) {
		TLog tLog = new TLog();
		tLog.setModuleName("模块"+i);
		 result = this.tLogService.insert(tLog);
	}
		if(result){
			return "success";
		}
		return "fail";
	}
}
